#pragma once
#include <vector>
#include <memory>
#include <functional>
#include <transfer/ITransfer.h>
#include "McuControl.h"

namespace ecarx::transfer::ipcp {

    class AudioIPCPConn:public ITransfer{
        class AudioNetIPCP;
        AudioNetIPCP* mImpl;
        public:
            explicit AudioIPCPConn();
            ~AudioIPCPConn();
            //打开链接
            bool open() override;
            //关闭链接
            bool close() override;
            //将数据写到网络上
            bool write(const Signal &) override;
            const std::optional<Signal> read(const int32_t signalId) const override;
            NetState getState() override;
            void onSignalChanged(SignalChangeCallback && callback) override;
            void registerStateHandler(NetStateCallback && callback) override;
            McuControl* getMcuControl();
            // template <typename _TY>
            void restoreAudioSettings(int32_t propertyId,int32_t value);
    };

}